package com.mcxx.modules.miniSalvation.order.service.write;

import com.mcxx.modules.miniSalvation.order.dao.write.OrderCertWriteDao;
import com.mcxx.modules.miniSalvation.order.entity.OrderCertEntity;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("orderCertWriteService")
@TaTransactional
public class OrderCertWriteService {

    @Autowired
    private OrderCertWriteDao orderCertWriteDao;


    public void insertCopy(OrderCertEntity orderCert){ orderCertWriteDao.insertCopy(orderCert); }


    public int insertIgnoreNull(OrderCertEntity orderCert){
        return orderCertWriteDao.insertIgnoreNull(orderCert);
    }


    public void deleteById(String id) {
        orderCertWriteDao.deleteById(id);
    }


    public void batchDelete(String[] ids) {
        orderCertWriteDao.batchDelete(ids);
    }


    public int copyCertInfo(String orderId,String newOrderId){
        return orderCertWriteDao.copyCertInfo(orderId,newOrderId);
    }

    public int copyInHouseCertInfo(String oldId,String newId,String newOrderId){
        return orderCertWriteDao.copyInHouseCertInfo(oldId,newId,newOrderId);
    }

    public int deleteByOrderId(String orderId){
        return orderCertWriteDao.deleteByOrderId(orderId);
    }


    public int copyMarriedCertInfo(String orderId,String supportId,String memberId){
        return orderCertWriteDao.copyMarriedCertInfo(orderId,supportId,memberId);
    }
}
